<script setup lang="ts">
import { onMounted } from 'vue';

import * as echarts from 'echarts';

onMounted(()=>{
let myChart = echarts.init(document.getElementById('main'));
myChart.setOption({
  title: {
    text: '数据',
    textStyle:{
        color:'white'
    }
  },
  lengend:{
    show:true,
    left:"auto",
    right:"auto",
    top:"auto",
    button:"auto"
  },
  tooltip: {},
  xAxis: {
    data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
  },
  yAxis: {
    show:false
  },
  series: [
    {
      name: '销量',
      type: 'bar',
      data: [5, 20, 36, 10, 10, 20]
    }
  ]
});
window.onresize=()=>{
  myChart.resize();
}
})

</script>


<template>
<div class="box"> 
      <div id="main">

      </div>
</div>
</template>

<style scoped>
.box{
  background-image: url(../images/kuang.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
#main{
  height: 100%;
}</style>